
CC=gcc -g -O0
LIB_DIR=-L lib 
LIB=-lrdkafka 
PTHREAD=-lz -lpthread -lrt
INCLUDE_OPTION=-I include
OPTIONS=$(LIB_DIR) $(LIB) $(PTHREAD)
PRODUCER=myproducer
CONSUMER=myconsumer


all:$(PRODUCER)	$(CONSUMER)

$(PRODUCER):src/myproducer.c
	$(CC) $^ $(INCLUDE_OPTION) -o $@ $(OPTIONS)
$(CONSUMER):src/myconsumer.c
	$(CC) $^ $(INCLUDE_OPTION) -o $@ $(OPTIONS)

.PHONY:clean
clean:
	rm -f $(PRODUCER) $(CONSUMER) 
